#include "person.h"

#include <stdio.h>
#include <stdlib.h>

static uint8_t person_introduce(const Person *person,char *introduce) {
	snprintf(introduce, MAX_INTRODUCE_LENGTH, "My name is %s. I am %d years old.", person->name, person->age);
    return FUNCTION_SUCCESS_CODE;
};

void Person_Init(Person *self, uint8_t age, char *name) {
    self->age = age;
    self->Introduce = person_introduce;
    snprintf(self->name, MAX_NAME_LENGTH, "%s", name);
}
